package com.ruoyi.project.module.vip.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.module.vip.mapper.VipMapper;
import com.ruoyi.project.module.vip.domain.Vip;
import com.ruoyi.project.module.vip.service.IVipService;
import com.ruoyi.common.support.Convert;

/**
 * vip 服务层实现
 * 
 * @author frey
 * @date 2018-11-13
 */
@Service
public class VipServiceImpl implements IVipService 
{
	@Autowired
	private VipMapper vipMapper;

	/**
     * 查询vip信息
     * 
     * @param id vipID
     * @return vip信息
     */
    @Override
	public Vip selectVipById(Integer id)
	{
	    return vipMapper.selectVipById(id);
	}
	
	/**
     * 查询vip列表
     * 
     * @param vip vip信息
     * @return vip集合
     */
	@Override
	public List<Vip> selectVipList(Vip vip)
	{
	    return vipMapper.selectVipList(vip);
	}
	
    /**
     * 新增vip
     * 
     * @param vip vip信息
     * @return 结果
     */
	@Override
	public int insertVip(Vip vip)
	{
	    return vipMapper.insertVip(vip);
	}
	
	/**
     * 修改vip
     * 
     * @param vip vip信息
     * @return 结果
     */
	@Override
	public int updateVip(Vip vip)
	{
	    return vipMapper.updateVip(vip);
	}

	/**
     * 删除vip对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteVipByIds(String ids)
	{
		return vipMapper.deleteVipByIds(Convert.toStrArray(ids));
	}
	
}
